package com.jz.community.moduleshopping.orderList.model;

import android.app.Activity;
import android.content.Context;

import com.jz.community.basecomm.net.rxandroid.OnLoadListener;
import com.jz.community.basecomm.task.ITaskCallbackListener;
import com.jz.community.moduleshopping.orderList.bean.NewOrderListInfo;
import com.jz.community.moduleshopping.orderList.task.OrderListTask;

/**
 * Created by Tony.Fan on 2018/4/27 16:08
 */
public class OrderModelImpl implements OrderModel {

    private Context mContext;

    public OrderModelImpl(Context context) {
        mContext = context;
    }

    @Override
    public void requestOrderInfo(String status, String page, boolean isNeedDialog,OnLoadListener<NewOrderListInfo> onLoadListener) {
        new OrderListTask((Activity) mContext,isNeedDialog, new ITaskCallbackListener() {
            @Override
            public void doTaskComplete(Object o) {
                onLoadListener.onSuccess((NewOrderListInfo) o);
            }
        }).execute(status,page);
    }
}
